DESCRIPTION_PROMPT = \
"""
You are a high-level synthesis expert.
Help me write a natural description of this high-level synthesis hardware design.

The description should cover the algorithm and functionality as well as the high level dataflow and architecture of the design.
Someone should be able to fully implement the design from the description provided.
Assume the reader knows little about the design and needs a detailed explanation.
Also include all details about any implementation quirks, edge cases, or design decisions that are important to this specific design.
This should include any latex equations if important or relevant to the design.

Include the list of top-level function inputs and outputs as well as a brief description of the functionality the kernel represents.
All arguments in the top-level function should be described in the inputs and outputs sections with details about the data type and layout.
Include a list of any important data structures and data types used in the design only if they are explicitly listed in the code.
Include a list of sub-components and a brief description of the functionality of each sub-component only if they are explicitly listed as separate C++ functions in the code.
If a sub-component is not listed as a separate C++ function, it should not be listed at all.

Make sure descriptions about the high-level algorithm, inputs, outputs, data structures, and sub-components are detailed and thorough and include information about implementation, data type size layout, and architecture.
Each description can be multiple sentences long.

Sometimes a pre-existing kernel_description.md file is provided.
If so use it as a starting guide but not the final output. Try to use all the information in the pre-existing description.

The top level kernel function is: `{top_name}`

Only output the description in a code block representing markdown.

The output should be formatted exactly follows with no deviation:
```
Kernel Description: A high level natural language description of the design... (be detailed and thorough, can be lengthy if needed, do not omit any details, can include latex equations if important or relevant to the design)

---

Top-Level Function: `name_of_top_level_function`

Complete Function Signature of the Top-Level Function:
`return_type name_of_top_level_function(input_1_type input_1, ...);`

Inputs:
- `input_1`: description of input_1...
- ....

Outputs:
- ‘output_1‘: description of output_1...
- ....

Important Data Structures and Data Types:
- `data_structure_1`: description of data_structure_1... (description of the data structure, data type, size, layout, fields, use in the design, etc. are required)

Sub-Components:
- `subcomponent_1`:
    - Signature: `return_type subcomponent_1(input_1_type input_1, ...);`
    - Details: natural language description of subcomponent_1...
- ...
```

Optional pre-existing simple kernel_description.md file:
{existing_description}

Input Kernel Code:
{kernel_code}

Description in requested markdown code block format (do not provide anything other than the description in the requested format):
"""
